#include <iostream>
#include <math.h>

using namespace std;
  class e{
        private:
        double x;
        public:
        e(int acc){
                x=2.0;
                for(int i = 2; i<acc; i++){
                        x+=1/silnia(i);
                }
        }

        double silnia(int base){
                double result=1;
                for(int i=1; i<=base;i++)
                result*=i;
        return result;
        }

        double result(){
        return x;
        }
};
int main() {
        e moje_e(100);
        cout.precision(15);
        cout << "Wynik: " << moje_e.result() << endl;
        return 0;
}
